package com.sun.mapper;

import com.sun.annotation.AutoFill;
import com.sun.entity.ArtworkDes;
import com.sun.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ArtworkDesMapper {

    /**
     * 批量插入详细信息数据
     * @param des
     */
    void insertBatch(List<ArtworkDes> des);

    /**
     * 根据艺术品id删除对应的详细信息
     * @param id
     */
    @Delete("delete from artwork_des where artwork_id = #{artworkId}")
    void deleteByArtworkId(Long id);

    /**
     * 根据艺术品id查询对应的详细信息
     * @param id
     * @return
     */
    @Select("select * from artwork_des where artwork_id = #{artworkId}")
    List<ArtworkDes> getByArtworkId(Long id);
}
